package com.deer.wms.base.system.service.impl;

import com.deer.wms.base.system.dao.bar.BarCodeMapper;
import com.deer.wms.base.system.model.bar.BarCode;
import com.deer.wms.base.system.model.bar.BarCodeDto;
import com.deer.wms.base.system.model.bill.BillOutMaster;
import com.deer.wms.base.system.service.bar.BarCodeService;
import com.deer.wms.common.core.service.AbstractService;
import com.deer.wms.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BarCodeServerImpl  extends AbstractService<BarCode, Integer> implements BarCodeService {
    @Autowired
    private BarCodeMapper barCodeMapper;

    @Override
    public BarCode findBarCodeById(Integer barCodeId) {
        return barCodeMapper.findBarCodeById(barCodeId);
    }

    @Override
    public List<BarCode> findBarCodeList(BarCodeDto barCodeDto) {
        return barCodeMapper.findBarCodeList(barCodeDto);
    }

    @Override
    public int delectBarCodeById(Integer barCodeId) {
        return barCodeMapper.delectBarCodeById(barCodeId);
    }

    @Override
    public int delectBarCodeByIds(String barCodeIds) {
        return barCodeMapper.delectBarCodeByIds(Convert.toStrArray(barCodeIds));
    }

    @Override
    public int updateBarCode(BarCode barCode) {
        return barCodeMapper.updateBarCode(barCode);
    }

    @Override
    public int saveBarCode(BarCode barCode) {
        return barCodeMapper.saveBarCode(barCode);
    }
}
